﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lm.Common.Net;
using Lm.Common.Auth.Common.RequestResponseModel.Login;
using Lm.Common.Auth;

namespace Lm.Common.Auth.Server.Services
{
    class LoginService : IRequestHandler
    {
        #region IRequestHandler 成员

        public object Handle(object request)
        {
            var loginRequest = request as Request;
            var token = new Lm.Common.Auth.Account.UserLogin()
                .Login(loginRequest.Account, loginRequest.Password);
            return new Lm.Common.Auth.Common.RequestResponseModel.Login.Response()
            {
                Token = token
            };
        }

        #endregion
    }
}
